<?php 
require_once 'sesi_login.php';
require_once 'konfigurasi.php';

fungsi('perkara');

define('PAGE', 'Perkara');
define('PAGE_ICO', 'icon-notes-2');
define('PAGE_URL', 'perkara.php');

define('SUBPAGE', 'Tambah SPDP');
define('SUBPAGE_ICO', 'icon-file');
define('SUBPAGE_URL', 'spdp.php');
	
koneksi_buka();
panggil_header();
?>

<div id="da-content-area">
<div class="row-fluid">

<div class="span12">
	<div class="da-panel">
		<div class="da-panel-header">
			<span class="da-panel-title">
				<i class="icon-file"></i> Tambah SPDP
			</span>
		</div>
		<div class="da-panel-content da-form-container">
			<form id="da-form-spdp" class="da-form" method="post" action="modul/perkara/perkara.proses.php">
				<div class="da-form-inline">
					<div class="da-form-row">
						<label class="da-form-label">Nomor Polisi <?php if(LEVEL!="sekretariat"){echo "SPDP";}?></label>
						<div class="da-form-item">
							<input type="text" name="no_polisi">
						</div>
					</div>
					<div class="da-form-row">
						<label class="da-form-label">Tanggal Penyidikan</label>
						<div class="da-form-item">
							<input id="da-tgl-penyidikan" type="text" name="tgl_penyidikan">
						</div>
					</div>
					<div class="da-form-row">
						<label class="da-form-label">Penyidik</label>
						<div class="da-form-item">
							<select id="kesatuan" class="select span6" name="kd_kesatuan">
								<option></option>
								<?php
									$q = mysql_query("SELECT * FROM r_kesatuan");
									while($dt = mysql_fetch_array($q)) {
								?>
								<option value="<?php echo $dt['kd_kesatuan'] ?>"><?php echo $dt['nm_kesatuan'] ?></option>
								<?php } ?>
							</select>
							<br /><br /><label for="kesatuan" generated="true" class="error" style="display:none;"></label>
						</div>
					</div>
					<div class="da-form-row">
						<label class="da-form-label">Melanggar Pasal</label>
						<div class="da-form-item">
							<input id="spdp_melanggar_pasal" type="text" class="span12" name="melanggar_pasal">
						</div>
					</div>
					<div class="da-form-row">
						<label class="da-form-label">Jenis Tindak Pidana</label>
						<div class="da-form-item">
							<select name="kd_pidana" id="spdp_kd_pidana">
								<option></option>
								<?php
									$q = mysql_query("SELECT * FROM r_jenis_pidana");
									while($dt = mysql_fetch_array($q)) {
								?>
									<option value="<?php echo $dt['kd_pidana'] ?>"><?php echo $dt['jns_pidana'] ?></option>
								<?php } ?>
							</select>
						</div>
					</div>
					<div class="da-form-row">
						<label class="da-form-label">Tanggal Diterima SPDP</label>
						<div class="da-form-item">
							<input id="da-tgl-diterima" type="text" name="tgl_diterima" value="<?php echo konversi_tanggal('d-m-Y',date('Y-M-d')) ?>">
						</div>
					</div>
				</div>
				<div class="btn-row">
					<button id="ubah-spdp" class="btn"><i class="icol-disk"></i> Simpan</button></legend>
					<input type="hidden" name="spdp" value="tambah" />
				</div>
			</form>	
		</div>
	</div>
</div>

</div>
</div>

<?php
panggil_footer();
koneksi_tutup();
?>
